package com.ids.bean;

import java.util.List;

public class EmployeeAttendanceStatistics {
	private String empCode;
	private String firstName;
	private List<EmployeeAttandence> employeeAttandence;
	private List<Double> attendanceGraph;
	public static final String DELIMITER =",";
	
	
	public List<Double> getAttendanceGraph() {
		return attendanceGraph;
	}
	public void setAttendanceGraph(List<Double> attendanceGraph) {
		this.attendanceGraph = attendanceGraph;
	}
	public String getEmpCode() {
		return empCode;
	}
	public void setEmpCode(String empCode) {
		this.empCode = empCode;
	}
	public List<EmployeeAttandence> getEmployeeAttandence() {
		return employeeAttandence;
	}
	public void setEmployeeAttandence(List<EmployeeAttandence> employeeAttandence) {
		this.employeeAttandence = employeeAttandence;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getDataForCSV(){
		StringBuffer strBuff = new StringBuffer();
		strBuff.append(empCode).append(DELIMITER);
		strBuff.append(firstName).append(DELIMITER);
		for (Double att : attendanceGraph) {
			strBuff.append(att).append(DELIMITER);
		}
		return strBuff.substring(0, strBuff.length() - 1);
	}

//	public static void main(String[] args) {
//		EmployeeAttendanceStatistics s = new EmployeeAttendanceStatistics();
//		s.setEmpCode("12345");
//		s.setFirstName("Deepak");
//		List<Double> l = new ArrayList<Double>();
//		l.add(15.4);
//		l.add(25.4);
//		l.add(35.4);
//		l.add(45.4);
//		s.setAttendanceGraph(l);
//		
//		System.out.println(s.getDataForCSV());
//	}
}
